{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
		<meta charset="utf-8">
		<link href="/static/tools/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/css/login/login.css" rel="stylesheet">
		<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <div class="u-icon-login">
        <h3>儿童脑适能</h3>
    </div>
	<div class="container m-container-login">
        <form class="form-signin">
            {% csrf_token %}
            <div class="m-tlt-login">
                <div class="m-wrap-tlt">
                    <h4 class="u-tlt-login u-tlt1-login">儿童脑适能</h4>
                    <h4 class="u-tlt-login u-tlt2-login">66NAO.COM</h4>
                </div>
            </div>
            <div class="form-group">
                <input class="form-control u-in u-in-login username" type="text" name="username" placeholder="用户名/账号" data-tip="请输入用户名/账号" value="{% if showtag == True %}{{ username }}{% endif %}"/>
            </div>
            <div class="form-group m-mar-bot0">
                <input class="form-control u-in u-in-login password" type="password" name="password" placeholder="密码" data-tip="请输入密码"/>
            </div>
            <p class="u-tip-login f-text-red
            {% if showtag == True %}
                fn-unvisi
            {% endif %}
        ">用户名或密码错误</p>
            <input type="hidden" value="password" name="grant_type">
            <input type="hidden" value="wispirit" name="client_id">
            <input type="hidden" name="source_url" value="{{ request.META.HTTP_REFERER }}">
            <input class="btn btn-lg btn-primary btn-block u-btn-login" type="submit" id="login" value="登录">
        </form>
        <form class="m-form-local fn-hide" action="{% url 'login' %}" method="post">
            <input type="hidden" name="source_url" value="{{ request.META.HTTP_REFERER }}">
            <input type="password" name="password" placeholder="密码" required/>
            <input type="hidden" name="username" placeholder="用户名" required autofocus/>
            <input class="btn btn-lg btn-primary btn-block" type="submit" value="登录">
        </form>
	</div>
    <script src="/static/js/framework/seajs/source/2.3.0/sea.js"></script>
    <script src="/static/js/config/seajs/seajs.js"></script>
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/tools/bootstrap/js/bootstrap.min.js"></script>
    <script>
        seajs.use(['/static/js/app/login/login'], function(login){
{#            console.log("{% url 'login' %}")#}
            login.init({
                action: "{% url 'login' %}",
                hiddenForm: '.m-form-local'
            });
        })
    </script>
</body>
</html>